-- GENERATED SPELL FOR [Naxxramas Worshipper] --


function spell0_16506(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(54095,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16506', 2500, 1)
end

function spell1_16506(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(54096,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16506', 2500, 1)
end

function spell2_16506(pUnit, Event) --@Widow\'s Embrace,Self--
pUnit:FullCastSpellOnTarget(28732,pUnit)
pUnit:RegisterEvent('Sorts_16506', 30338, 1)
end

function Sorts_16506(pUnit, Event)
local choix_sorts_16506 = math.random(0, 2)
if choix_sorts_16506 == 0 then
pUnit:RegisterEvent('spell0_16506', 1, 1)
end
if choix_sorts_16506 == 1 then
pUnit:RegisterEvent('spell1_16506', 1, 1)
end
if choix_sorts_16506 == 2 then
pUnit:RegisterEvent('spell2_16506', 1, 1)
end
end

function mob16506_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16506', math.random(1500, 3000), 1)
end

function mob16506_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16506_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16506_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16506, 1, 'mob16506_Action')
RegisterUnitEvent(16506, 2, 'mob16506_Leave')
RegisterUnitEvent(16506, 3, 'mob16506_Kill')
RegisterUnitEvent(16506, 4, 'mob16506_Die')
